﻿IF EXISTS (SELECT * FROM sysobjects WHERE type = 'P' AND name = 'P_RegisterOperationExecution')
	BEGIN
		DROP  Procedure  [esf_sso].P_RegisterOperationExecution
	END

GO

CREATE Procedure [esf_sso].P_RegisterOperationExecution
	@pCustomOperationName	VARCHAR (500) = NULL
	,@pXMLParams			XML = NULL
	,@pUserAlias			VARCHAR (20) = NULL
	,@pExecutionDateTime	DATETIME
	,@pUserHostAddress		VARCHAR (400) = NULL
AS
	
	INSERT INTO esf_sso.OperationExecution
	(
		CustomOperationName,
		XMLParams,
		UserAlias,
		ExecutionDateTime,
		UserHostAddress
	)
	VALUES
	(
		@pCustomOperationName,
		@pXMLParams,
		@pUserAlias,
		@pExecutionDateTime,
		@pUserHostAddress
	)